<%= page_title_with_buttons f %>
<div class="padded row-fluid clearfix">
  <%= f.input :name, slug_source_if(f.object.new_record?) %>
  <%= f.input :path, input_html: {class: 'slug-dest', data: {prefix: parent.path}} if parent %>
  <%= f.input :hidden, label: "Hide from menus?" if parent %>
  <%= able_to?(:administrate) do %>
      <%= f.association :groups,
                        collection: public_groups,
                        as: :check_boxes,
                        label: 'Public Permissions',
                        input_html: {class: "public_group_ids"},
                        hint: 'Which "Public" groups can view pages in this section?'
      %>
      <div class="check_uncheck">
        <%= check_uncheck_tag 'input.public_group_ids' %>
      </div>

      <%= f.association :groups,
                        collection: cms_groups,
                        as: :check_boxes,
                        label: 'CMS Permissions',
                        input_html: {class: "cms_group_ids"},
                        hint: 'Which "CMS" groups can edit pages and content in this section?'
      %>
      <div class="check_uncheck">
        <%= check_uncheck_tag 'input.cms_group_ids' %>
      </div>
  <% end %>
</div>
<%= bottom_buttons f %>
